<template>
  <div class="gly">
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="id" label="用户ID" width="180">
      </el-table-column>
      <el-table-column prop="user_name" label="账号">
      </el-table-column>
      <el-table-column prop="user_phone" label="手机号">
      </el-table-column>
      <el-table-column prop="user_nickname" label="昵称">
      </el-table-column>
    </el-table>

  </div>
</template>

<script>
import { alluser } from '@/api/index.js'
export default {
  data() {
    return {
      tableData: []
    }
  },
  methods: {
    async getData() {
      let res = await alluser()
      if (res.data.code == 200) {
        this.tableData = res.data.msg
      }
    }
  },
  mounted() {
    this.getData()
  }
}
</script>

<style scoped lang="less">
.gly {
  margin: 0 2%;
}
</style>